package com.unicomcz.query;

import java.sql.ResultSet;
import java.text.SimpleDateFormat;
import java.util.List;

import com.unicomcz.DetailPageAction;
import com.unicomcz.commision.DetailTc;

public class SerialInfoAction extends DetailPageAction
{
    public String getSqlStr() {
        String sqlStr="SELECT serial_number 号码,product_name 套餐,open_time 激活时间,user_state 状态,balance 余额,charge 实时话费 " + 
                " FROM dls_user_info where depart_id=?  order by open_time,serial_number";
        return sqlStr;
    }
    public Object[] getParams() {
        return new Object[]{userInfo.getDepartCode()};
    }
    protected void regQueryParam() throws Exception{      
        log.debug(userInfo.getDepartCode());
        pstmt.setString(1, userInfo.getDepartCode());
    }
    protected void rs2List(ResultSet rs,List out) throws Exception{
        SerialInfo t = new SerialInfo();
        t.setSerialNumber(rs.getString(1));
        t.setProductName(rs.getString(2));
        t.setOpenTime(rs.getString(3)); 
        t.setUserState(rs.getString(4));
        t.setBalance(rs.getString(5));
        t.setCharge(rs.getString(6));
        out.add(t);
    }

}
